﻿<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
    <title>Examples</title>
    <script type="text/javascript" src="http://ajax.aspnetcdn.com/ajax/jquery/jquery-1.4.4.min.js"></script>
    <script type="text/javascript" src="http://ajax.aspnetcdn.com/ajax/jquery.ui/1.8.10/jquery-ui.min.js"></script>
    <link rel="Stylesheet" type="text/css" href="http://ajax.aspnetcdn.com/ajax/jquery.ui/1.8.10/themes/cupertino/jquery-ui.css" />
    <link rel="Stylesheet" href="examples.css" type="text/css" />
    <script type="text/javascript">
        $(function () {
            $("#accordion").accordion({
                autoHeight: false
            });
        });
    </script>
</head>
<body>
    <div id="content">
        <h1>
            Quest 5.0 - WebPlayer</h1>
        <h2>
            Using HTML and JavaScript for a modern IF experience</h2>
        <p>
            Demo by Alex Warren, <a href="mailto:alex@axeuk.com">alex@axeuk.com</a> - <a href="http://www.axeuk.com/">
                www.axeuk.com</a> - <a href="http://www.textadventures.co.uk">www.textadventures.co.uk</a></p>
        <div id="accordion">
            <h3>
                Are web browsers the future for IF?</h3>
            <div>
                <p>
                    Web browsers can no longer be second class citizens when it comes to playing text
                    adventure games - increasingly, they're how players expect to be able to interact
                    with a game. We can't rely on people downloading and installing interpreters. If
                    we want to attract a bigger audience, it must require no effort for a player to
                    start playing a game.</p>
                <p>
                    When I look at the server statistics for textadventures.co.uk, the number of people
                    playing games online outnumbers those who download for offline play, by as many
                    as ten to one. If this is the way that the vast majority of people are choosing
                    to play text adventure games, the experience has to be just as good online as offline.</p>
            </div>
            <h3>
                Why is this a good thing?</h3>
            <div>
                <p>
                    Although it may be different to how we're used to playing, it is actually a great
                    opportunity. Enabling the full experience in a web browser opens up interactive
                    fiction to all platforms, including mobile devices - iPhone, iPad, Android, Kindle
                    and so on. But not only that, it allows us to interact with text adventure games
                    in more innovative ways. By harnessing the power of HTML and JavaScript, it is possible
                    to create innovative interfaces, and integrate games with the rest of the web.</p>
            </div>
            <h3>
                What is Quest 5.0? Doesn't Quest suck?</h3>
            <div>
                <p>
                    Maybe you've come across earlier versions of Quest - maybe you've dismissed it as
                    underpowered, expensive, and Windows-only. Well, it's changing - Quest 5.0 is a
                    <b>complete rewrite</b>, and it's both <b>free</b> and <b>open-source</b>. It's
                    much more powerful than previous versions, with most features implemented via customisable
                    libraries rather than being hard-coded. It features a component called WebPlayer
                    which serves games using AJAX - similar to the current "Play Online" feature at
                    textadventures.co.uk, but without the need for Flash.</p>
                <p>
                    An advantage of the AJAX approach, as opposed to implementing a Quest interpreter
                    in JavaScript, is that game is run on the server, not the client - so even large
                    games can be loaded easily on any device.</p>
            </div>
            <h3>
                How much works already?</h3>
            <div>
                <p>
                    WebPlayer is a work in progress. It currently supports all features of "legacy"
                    Quest games (i.e. those designed for earlier versions) - text formatting, pictures,
                    sounds, and the inventory, places/objects and compass panes. In addition, it supports
                    a variety of new features for Quest 5.0 games:</p>
                <ul>
                    <li>Hyperlinks - clicking an exit hyperlink immediately takes you in that direction.
                        Clicking an object hyperlink gives you a customisable list of verbs (look at, take
                        etc.) which can be applied to the object.</li>
                    <li>Ability to insert custom HTML into the game window, to customise the look and feel</li>
                    <li>Two-way interaction between game code and client-side JavaScript - this is the most
                        exciting new feature. It allows complete customisation of the game interface, because
                        a JavaScript function on the client can trigger game code on the server, and game
                        code can trigger a JavaScript function on the client.</li>
                </ul>
            </div>
            <h3>
                Show me!</h3>
            <div>
                <p>
                    This demonstration of WebPlayer will attempt to show a few ideas for how modern
                    interactive fiction can use the full power of the web browser.</p>
                <p>
                    <a href="../Play.aspx?file=demo/demo.aslx">Demo 1</a> shows the basic functionality - see the hyperlinks in action, and see custom
                    JavaScript embedding a YouTube video in the game.</p>
                <p>
                    <a href="../Play.aspx?file=twohalves/twohalves.aslx&style=fluid">Demo 2</a> shows something a bit different - an example of a customised interface. In
                    this case we dispense with the standard text input box, and instead we split the
                    screen in two. Each side of the screen is a different character, and you can control
                    both of them as they interact with the world and each other.
                </p>
            </div>
        </div>
        <div id="demos">
            <p><a href="../Play.aspx?file=demo/demo.aslx">Play Demo 1 - standard WebPlayer features</a></p>
            <p><a href="../Play.aspx?file=twohalves/twohalves.aslx&style=fluid">Play Demo 2 - split-screen IF</a></p>
        </div>
    </div>
</body>
</html>
